import { Boolean, Code, CreateDate, Int, Link, PrimaryUuid, UpdateDate } from "../utils";
import { Entity, Index } from "typeorm";


@Entity({
    name: 'fj_room_image'
})
@Index('FJ_ROOM_IMAGE_FROM_ROOM_ID', ['from','roomid'])
export class FjRoomImage {
    @PrimaryUuid()
    id: string;

    @Int()
    hotelid: number;

    @Int()
    roomid: number;

    @Link()
    image_url: string;

    @Boolean()
    is_default: boolean;

    @Code()
    from: string;

    @Code({ nullable: true })
    @Index()
    hash: string;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}